package com.sanxiau.dormitory.yang.mapper;

import com.sanxiau.dormitory.yang.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface Ex_dorMapper {
    /*查询所有换寝记录*/
    public List<Ex_dor> queryAllEx_dors();
    /*添加换寝记录*/
    public int addEx_dor(Ex_dor ex_dor);
    /*查询学生是否存在未通过的申请，避免重复提交申请*/
    public Ex_dor queryEx_dorByStu_id(String stu_id);
    /*查询学生的寝室财产表*/
    public Riches queryRichesByStu_id(String stu_id);
    /*查询指定寝室*/
    public Dorm queryDorm(String hou_id,String dor_id);
    /*查询学生的换寝记*/
    public List<Ex_dor> queryEx_dor(String stu_id);
    /*根据具体寝室重新学生*/
    public Riches queryRiches(String hou_id,String dor_id,String bed_id);
    /*修改换寝申请流程*/
    public int updateEx_dor(Ex_dor ex_dor);
    /*查询换寝记录*/
    public Ex_dor queryEx_dorByID(int id);
    /*修改寝室实际人数*/
    public int updateDorm(Dorm dorm);
    /*查询指定宿舍楼*/
    public House queryHouse(String hou_id);
    /*修改宿舍楼实际人数*/
    public int updateHouse(String hou_id,int hou_fact);
    /*修改宿舍财产信息*/
    public int updateRiches(Riches riches);
    /*修改学生宿舍信息*/
    public int updateStudent(String hou_id,String dor_id,String stu_id);
}
